package com.parachutes.aspbillcore.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
//@ConfigurationProperties(prefix = "alipay")
public class AlipayConfiguration {

    @Bean
    public com.alipay.api.AlipayConfig alipayConfig(){
        String privateKey  = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCc1hmJzQ4w0XN8PldUpqQnmUypQKqNJOneokiW8URepkEoZ1bGjCJVj1p2kLukHQyXwfW7NEPh80QruHAwwRRgD2s/h7GPNTBdz9fMgasgTBPe4gqTVzamth8C2z0wqJl8bwqIpjSUUrZncQin8Ki1Je8ssJ9ef8DJuIbrJi/+ibSgcePSPuhKenC98Xfj2MkttUsaDFGUcWDjXeeMvnjV6VahwBkY6yWvHEnJ1T5kIKXXw6fedZeUUGiBifpTfkz+jBmEj11oq0lxnt48IC5HLJ/0cnJKmZCa/KKP6/Tf92EjHp52u4x/osxn7dyXWJ5faAtXoghP84W3V1IVTa35AgMBAAECggEAewz0Do0G9EBxJmrXJAB2zObXIfgtl/39TALxhxQWu1gfyS6DA9ZQ3eZSaLIXtqRgC/VO8ikIlY/Czbawt1/Vt6SBVeAF7MEjiIcY3khiVj26XWXmPEHyDAzZ+ei/cpzlh56rmhklKbZXjIM/8lu8UhxIMj0FXSRIwzv3Byn3//EajFZWSyrkSJGG53hKwQyi2eD8dyqgBpHVeldYd1CaFY4Iu8rH2tEShiLTfKYLvX/qERZw71VfXSA0tCT2sxkuEY3Tqw34UiVDg5lHrob9WGmP8XIBKGWopfhk9VHBSKavwamkJ1W+7FgEatmAsOe/Rr1sQdXUCAJcMg1quzZATQKBgQDJLMa4pC1Gl5e2nbKsypJpebIVQ+nEjFZbqRd1YQyTmMtpMQ6QeMgQfgkeflJHo6bcQK/6Qymw2K3sckfi86/CGlyszzWyf/vo/8w2BVx2NsCMMdGD4bXJ+PlU/OMQ+APq1+PW6iU+KOqM1ZcJ/7L5al2pHXZgzZ0kIGfiNOJM8wKBgQDHk/xodJD/5MDYOOTU/+qaFLWx9G4P3HAi2FcH79DQ8yH9GqTcE1rF2uG+D1D+46q8Oi/IZzPpEgmLbVenpFB7HXsPXP64QZoQiX9llbrfWqUpRzd+iACpgRp79l3E6V6/BByf2Bg75a20YfYjcxD6toO2+TP25n34iXChaBlkYwKBgAhrhlm+DWMR/ziWex7+T4h4nnqDYCpo0Uh+2EuCZ1taHtFlSz3CwGToUYtkMB9texNm5baszvbm6sils9qM5oNSRSS6e33gG3QSGML+EHOmMQLtJt7FOK2ebRkgiIRyTP+sT430OODUJ5UDb5HskNodmJP2drjwgi476P0vx3T/AoGAGn/93ejMcA3xxUQYrmekwPzK+2wXSSfeA+Jx++3N7lC6TJ9DEK3JOchMfS4PdSjJvOCFA7kgXWw1tDu6jdn1jcNmWa3hbJnZWSTIs7Zj79BbadW4+qYYYGlyGM+nt8O8/uQO4PKSlTF0FSWEx0Q6FvAxIRSJ39jPFTc6q1PlOz0CgYA++SQcJxeTKHDlv4092G8ovrey9vOesbI7GmhyZ1MhqpnGkh3CA5LkPDnXlp4K9TiOggGxDSMtio5vibIrq2vN/kQsSiSamafbU3GUBFG3GpCGevlPbzwoNmBTNRds4+BVZkUTE3i3idHnhiZCMnu1E+l8DDFMcyLh0dvOKQTVyw==";
        com.alipay.api.AlipayConfig alipayConfig = new com.alipay.api.AlipayConfig();
        alipayConfig.setPrivateKey(privateKey);
        alipayConfig.setServerUrl("https://openapi-sandbox.dl.alipaydev.com/gateway.do");
        alipayConfig.setAppId("9021000143641216");
        alipayConfig.setCharset("UTF-8");
        alipayConfig.setSignType("RSA2");
        alipayConfig.setFormat("json");
        alipayConfig.setAppCertPath("D:\\code\\java\\API-Sharing-Platform\\asp-bill\\asp-bill-core\\src\\main\\resources\\appPublicCert.crt");
        alipayConfig.setAlipayPublicCertPath("D:\\code\\java\\API-Sharing-Platform\\asp-bill\\asp-bill-core\\src\\main\\resources\\alipayPublicCert.crt");
        alipayConfig.setRootCertPath("D:\\code\\java\\API-Sharing-Platform\\asp-bill\\asp-bill-core\\src\\main\\resources\\alipayRootCert.crt");
        return alipayConfig;
    }
}